using System;
#if BaseOn
using System.Collections.Generic;
using System.Data.SqlServerCe;
#endif

namespace IntetfaceEditor4PDA
{
    public class QueryExec
    {
        private readonly int pErrorCode = -1;
        /// <summary>
        /// Gets the error code.
        /// </summary>
        /// <value>The error code.</value>
        public int ErrorCode
        {
            get { return pErrorCode; }
        }
        private readonly string pErrorMsg = "No error";
        /// <summary>
        /// Gets the error Message.
        /// </summary>
        /// <value>The error Message.</value>
        public string ErrorMsg
        {
            get { return pErrorMsg; }
        }
        /// <summary>
        /// Executes SQL.
        /// </summary>
        /// <param name="SQL">The SQL-command to execute.</param>
        /// <returns></returns>
        public bool Execute(string SQL)
        {
#if BaseOn

            SqlCeCommand command = new SqlCeCommand(SQL, DataBase.Get());
            command.ExecuteNonQuery();
#endif
            return true;
           
        }
    }
}